package com.zc.http.processor.core.config;

import com.zc.http.processor.core.advice.ResponseExceptionAdvice;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自动装配异常处理
 *
 * @author zcj
 * @version 1.0.0
 * @date 2022/5/27 17:43
 */
@Configuration(proxyBeanMethods = false)
public class ExceptionAdviceConfiguration {

    @Bean
    @ConditionalOnMissingBean(ResponseExceptionAdvice.class)
    public ResponseExceptionAdvice responseExceptionAdvice() {
        return new ResponseExceptionAdvice();
    }


}
